﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfDjackInfo.aspx.cs" Inherits="msBsc.WebUi.mMall.Seller.mfDjackInfo" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>地接客-个人资料</title>
    <%=getMeta()%>
    <link href="/themes/mStyle1/css/home/base.css" rel="stylesheet" type="text/css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mhome.css" charset="gbk" />
    <link href="/jqPlugin/Jcrop/css/jquery.Jcrop.min.css" rel="stylesheet" charset="gbk" />
    <%=getBodyBeforeJs()%>
     <!--start JS引用-->
    <script type="text/javascript" src="/jqPlugin/js/jquery-1.8.3.min.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBase.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/js/jBPage.js" charset="gbk"></script>
    <script type="text/javascript" src="/themes/Style1/jsQt.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/js/laytpl.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/laydate/laydate.js" charset="gbk"></script>
    <script type="text/javascript" src="/themes/wStyle1/js/comm/VerifyJs.js" charset="gbk"></script>
    <script type="text/javascript" src="/themes/wStyle1/js/comm/DateInfo.js" charset="gbk"></script>
    <script type="text/javascript" src="/jqPlugin/Jcrop/js/jquery.Jcrop.min.js" charset="gbk"></script>
    <!--end JS引用-->
    <style type="text/css">
        .green {
            background: none repeat scroll 0 0 #69cd38;
            border: medium none;
            border-radius: 7px;
            color: #fff;
            cursor: pointer;
            display: inline-block;
            font-size: 16px;
            font-weight: bold;
            height: 36px;
            line-height: 36px;
            padding: 0 20px;
            text-align: center;
            min-width: 200px;
            width: 100%;
        }

        .fabu {
            width: 95%;
            margin: 15px auto;
        }

        .user_head {
            min-width: 240px;
            min-height: 220px;
            width: 100%;
            height: 150px;
            background: url('/themes/mStyle1/Image/mbuser/bguser.jpg') center;
        }

        .user_bg_img {
            min-width: 300px;
            min-height: 150px;
            width: 100%;
            height: 30%;
        }

        .usr_bg_top {
            width: 115px;
            padding-top: 30px;
            margin-left: auto;
            margin-right: auto;
        }

            .usr_bg_top img {
                border-radius: 50%;
                width: 114px;
                height: 114px;
            }

        .user_name {
            text-align: center;
            color: #fff;
            margin-top: 10px;
        }

        .menu_info {
            height: 60px;
            border-bottom: 1px solid #cccccc;
            border-top: 1px solid #cccccc;
        }

        .info {
            width: 130px;
            margin: 5px auto;
            font-size: 18px;
            text-align: right;
        }

        .info_ico {
            background: url('/themes/mStyle1/Image/mbuser/userinfo1.gif') no-repeat left #0a7fc6;
            background-color: #0a7fc6;
            border: 1px solid #0a7fc6;
            border-radius: 25px;
            width: 50px;
            height: 50px;
            float: left;
        }

        .info_phone {
            background: url('/themes/mStyle1/Image/mbuser/phone.gif') no-repeat left #0a7fc6;
        }

        .info p {
            padding-top: 12px;
        }

        .content_info {
            background-color: #edeeee;
            height: 400px;
        }

        .content_text {
            background-color: #edeeee;
        }



        .content_info ul li {
            height: 55px;
            padding-top: 20px;
        }

        .content_info ul {
            display: table;
        }

        .control-span {
            color: #787676;
            float: left;
            font-family: 微软雅黑;
            font-size: 17px;
            text-align: right;
            min-width: 80px;
        }

        .control-text {
            color: #787676;
            font-family: 微软雅黑;
            font-size: 17px;
            text-align: right;
            min-width: 80px;
            width: 35%;
        }

        .control-info {
            color: #333333;
            font-family: 微软雅黑;
            font-size: 18px;
            float: left;
            margin-left: 15px;
        }

        .txtlong {
            word-wrap: break-word;
            font-size: 15px;
            line-height: 29px;
        }

        .required {
            color: red;
            vertical-align: middle;
        }

        .help-inline {
            color: red;
            display: inline-block;
        }

        .controls {
            color: #333333;
            font-family: 微软雅黑;
            font-size: 14px;
            padding-bottom: 5px;
        }

        .content_text ul {
            width: 95%;
            margin: auto;
        }

            .content_text ul li {
                padding-top: 20px;
            }

        .iput_text {
            width: 100%;
            height: 30px;
            font-family: 微软雅黑;
            font-size: 16px;
        }

        .iput_textarea {
            height: 120px;
        }

        .iput_selsect {
            min-width: 240px;
            height: 30px;
            margin-top: 15px;
        }

        .div_view {
            margin: 10px auto;
            width: 100%;
        }

        .c_userAvatar {
            background: url("/themes/mStyle1/Image/buyer/changePhoto.png") no-repeat scroll 0 0 / 154px 38px rgba(0, 0, 0, 0);
            cursor: pointer;
            display: block;
            height: 38px;
            margin: 20px auto;
            width: 154px;
        }

        .m_t_type {
            margin-top: 20px;
            text-align: center;
        }

        .m_t_img {
            background: url("/themes/mStyle1/Image/buyer/m_contact.png") no-repeat scroll 0 0 / 36px auto rgba(0, 0, 0, 0);
            display: inline-block;
            height: 36px;
            margin-right: 10px;
            vertical-align: middle;
            width: 36px;
            float: left;
        }

        .m_t_name {
            font-size: 24px;
            font-weight: normal;
            vertical-align: middle;
        }

        .m_t_basic {
            background-position: 0 -36px;
        }

        a {
            text-decoration: none;
        }

        @media (max-width:400px) {
            .yaoqinurl {
                margin-top: -25px;
                width: 60%;
                height: 70px;
            }
        }
    </style>
</head>
<body style="padding: 0;">
    <div class="viewport">
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapHeaderMenuHtml(true) %>
        <div class="main" id="displayView">

            <div class="user_head">
                <div class="usr_bg_top">
                    <img id="headImg" />
                </div>
                <p id="headName" class="user_name">梅赛德斯-奔驰V8</p>
            </div>
            <div class="menu_info">
                <div class="info">
                    <div class="m_t_img m_t_basic"></div>
                    <p>基本信息</p>
                </div>
            </div>
            <div class="content_info" style="height: 300px;">
                <ul>
                    <li>
                        <span class="control-span">呢称:</span>
                        <span id="userName" class="control-info">梅赛德斯-奔驰V8</span>
                    </li>
                    <%--<li>
                        <span class="control-span">姓名:</span>
                        <span class="control-info">何苗苗</span>
                    </li>--%>
                    <li>
                        <span class="control-span">性别:</span>
                        <span id="sex" class="control-info">女</span>
                    </li>
                    <%--<li>
                        <span class="control-span">证件号:</span>
                        <span class="control-info">50010319</span>
                    </li>--%>
                    <li>

                        <span class="control-span">所在地:</span>
                        <span class="control-info">
                            <i id="country" data-value="">中国 </i>
                            <i id="city" data-value="">/ 重庆 </i>
                            <i id="destion" data-value="">/ 沙坪坝</i>
                        </span>
                    </li>
                    <li>
                        <span class="control-span">简介:</span>
                        <span id="briefIntrodu" class="control-info txtlong">扩大解放开绿灯分开两地分开了的顺口溜发动机反抗螺丝钉解放昆仑山大家来看是解放昆仑山大家都来赛开发的考虑逢低建立福建省电力</span>
                    </li>
                </ul>
            </div>
            <div class="menu_info">
                <div class="info">
                    <div class="m_t_img"></div>
                    <p>联系方式</p>
                </div>
            </div>
            <div class="content_info" style="height: 500px;">
                <ul>
                    <li>
                        <span class="control-span">邀请地址:</span>
                    </li>
                    <li>
                        <span id="inviteUrl" class="control-info txtlong yaoqinurl"></span>
                    </li>
                    <li>
                        <span class="control-span">&nbsp;</span>
                        <span id="Span1" class="control-info">&nbsp;</span>
                    </li>
                    <li>
                        <span class="control-span">电话:</span>
                        <span id="Mobile" class="control-info">13996286798</span>
                    </li>
                    <li>
                        <span class="control-span">固定电话:</span>
                        <span id="Phone" class="control-info">023-68705303</span>
                    </li>
                    <li>
                        <span class="control-span">QQ:</span>
                        <span id="QQ" class="control-info">804495105</span>
                    </li>
                    <li>
                        <span class="control-span">微信:</span>
                        <span id="Micro" class="control-info">5545414</span>
                    </li>
                    <li>
                        <span class="control-span">邮箱:</span>
                        <span id="Email" class="control-info">d804495105@qq.com</span>
                    </li>
                </ul>
                <div class="fabu">
                    <span onclick="editBasicInfo();" class="green">修改个人资料</span>
                </div>
            </div>
        </div>
        <div class="main" id="edit" style="display: none">
            <div class="user_head">
                <div class="usr_bg_top">
                    <img id="headPhoto" />
                </div>
                <a class="c_userAvatar">
                    <input id="image_file" type="file" style="width: 154px; height: 38px; opacity: 0;" />
                </a>
            </div>
            <div class="menu_info">
                <div class="info">
                    <div class="m_t_img m_t_basic"></div>
                    <p>基本信息</p>
                </div>
            </div>
            <div>
                <ul>
                    <li>
                        <div class="controls">
                            <div class="demo" style="display: none">
                                <input type="button" value="取 消" class="btn_upload btn_clear_upload" onclick="clearDotest();" />
                                <div class="step2">
                                    <img id="preview" />
                                </div>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">呢称<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <input id="txtUserName" class="iput_text" value="梅赛德斯-奔驰V8" type="text" />
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">性别<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <input id="man" type="radio" value="M" name="sex" />
                                <label for="man">男</label>
                                <input id="wman" type="radio" name="sex" value="F" checked="checked" />
                                <label for="wman">女</label>
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">所在地<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <select id="txtcountry" class="iput_selsect"></select>
                                <select id="txtcity" class="iput_selsect"></select>
                                <select id="txtdestion" class="iput_selsect"></select>
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">简介<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <textarea id="txtBriefIntrodu" class="iput_text iput_textarea ">
                                扩大解放开绿灯分开两地分开了的顺口溜发动机反抗螺丝钉解放昆仑山大家来看是解放昆仑山大家都来赛开发的考虑逢低建立福建省电力
                            </textarea>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>

            <div class="menu_info">
                <div class="info">
                    <div class="m_t_img"></div>
                    <p>联系方式</p>
                </div>
            </div>
            <div style="height: 610px;">
                <ul>
                    <li>
                        <span class="control-text">电话<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <input id="txtMobile" class="iput_text" value="13996286798" type="text" />
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">固定电话<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <input id="txtPhone" class="iput_text" value="023-68705303" type="text" />
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">QQ<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <input id="txtQQ" class="iput_text" value="804495105" type="text" />
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">微信<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <input id="txtMicro" class="iput_text" value="5545414" type="text" />
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                    <li>
                        <span class="control-text">邮箱<span class="required">*</span></span>
                        <div class="controls">
                            <div class="div_view">
                                <input id="txtEmail" class="iput_text" value="d804495105@qq.com" type="text" />
                                <span class="help-inline"></span>
                            </div>
                        </div>
                    </li>
                </ul>
                <div style="width: 98%; margin: 40px auto;">
                    <span class="green" onclick="cancelEdit();" style="width: 110px; min-width: 50px; float: left;">取消</span>
                    <span class="green" onclick="seveUserInfo();" style="width: 110px; min-width: 50px; float: right;">确认修改</span>
                </div>
            </div>
        </div>
        <%=msBsc.WebUi.Code.QtHtmlGet.GetWapMenuHtml() %>
    </div>
    <!--start JS引用-->
    <%-- <script src="/jqPlugin/js/jquery-1.8.3.min.js" charset="gbk"></script>
    <script src="/jqPlugin/js/jBase.js" charset="gbk"></script>
    <script src="/jqPlugin/js/jBPage.js" charset="gbk"></script>
    <script src="/jqPlugin/js/laytpl.js" charset="gbk"></script>
    <script src="/jqPlugin/laydate/laydate.js" charset="gbk"></script>
    <script src="/jqPlugin/SelectSimu/js/SelectSimu.js" charset="gbk"></script>
    <script src="/themes/wStyle1/js/comm/VerifyJs.js" charset="gbk"></script>
    <script src="/jqPlugin/Jcrop/js/jquery.Jcrop.min.js" charset="gbk"></script>
    <script src="/jqPlugin/Jcrop/js/script.js" charset="gbk"></script>--%>
    <!--end JS引用-->

    <script type="text/javascript" charset="gbk">
        var parentsId = "00000000-0000-0000-0000-000000000000";
        var currentCountry = "";
        var currentCity = "";
        var initImg = "";
        (function () {

            InitImgUpload("image_file", "preview", 600, [40, 40], [450, 450], function (_base64) {
                //没剪切前返回压缩后的值，剪切后返回剪切的值,可以将这个值赋值给IMG控件进行预览
                $("#headPhoto").attr("src", _base64);
            });

            $("#h_title").text("地接客-个人资料");
            $.getMessageCount();
            $('#country_select .selectList li').live('click', function () {
                var outerInnerId = this.getAttribute('data-value');
                if (currentCountry == outerInnerId) {
                    return;
                }
                currentCountry = outerInnerId;
                parentsId = outerInnerId;
                btnDo("getArea2");
            });
            $('#city_select .selectList li').live('click', function () {
                var provinceId = this.getAttribute('data-value');
                if (provinceId == currentCity) {
                    return;
                }
                currentCity = provinceId;
                parentsId = provinceId;
                btnDo("getArea3");
            });
        })()
        function clearDotest() {
            $("#headPhoto").attr("src", initImg);
            $(".demo").hide();
            $(".step2").html("");
            $(".step2").html("<img id='preview' />");
        }
        function btnDo(sEbtn) {
            GtGrid1Action = sEbtn;
            var opart = GetGtParam();
            if (sEbtn == "getArea3" || sEbtn == "getArea2") {
                opart.AddCell("parentsId", parentsId)
            }
            ajaxComm(opart);
        };

        //执行AJAX调用时获取参数
        function GetGtParam() {
            var _jsParam = new jsonRow();
            _jsParam.AddCell("ACTION", GtGrid1Action);
            return _jsParam;
        };

        btnDo("init");

        function setDjackInfo(data) {
            initImg = data.rows[0].CUSTOMER_DEFAULT_PIC + " 197x197img.jpg";
            $("#headImg").attr("src", data.rows[0].CUSTOMER_DEFAULT_PIC + " 197x197img.jpg");
            $("#inviteUrl").text("http://www.dijieke.com/wp_UserRegister.htm?invatationCode=" + data.rows[0].CUSTOMER_INVITATION_CODE);
            $("#headName").html(data.rows[0].CUSTOMER_NICK);
            $("#userName").html(data.rows[0].CUSTOMER_NICK);

            $("#country").html(data.rows[0].P_COUNTRY_NAME + " / " + data.rows[0].P_CITY_NAME + " / " + data.rows[0].P_DISTINATION_NAME);

            //地区
            $("#country").attr("data-value", data.rows[0].CUSTOMER_COUNTRY_ID);
            $("#country").html(data.rows[0].P_COUNTRY_NAME);
            currentCountry = data.rows[0].CUSTOMER_COUNTRY_ID;
            //市
            $("#city").html(" / " + data.rows[0].P_CITY_NAME);
            $("#city").attr("data-value", data.rows[0].CUSTOMER_CITY_ID);
            currentCity = data.rows[0].CUSTOMER_CITY_ID;
            //区
            $("#destion").text(" / " + data.rows[0].P_DISTINATION_NAME);
            $("#destion").attr("data-value", data.rows[0].CUSTOMER_DISTINATION_ID);
            //$("#Sex span").attr("data-value", data.rows[0].CUSTOMER_BASEINFO_GENDER);
            if (data.rows[0].CUSTOMER_BASEINFO_GENDER == "M") {
                $("#sex").text("男");
            } else if (data.rows[0].CUSTOMER_BASEINFO_GENDER == "F") {
                $("#sex").text("女");
            }
            $("#briefIntrodu").text(data.rows[0].CUSTOMER_BASEINFO_INTRO);
            $("#QQ").html(data.rows[0].CUSTOMER_BASEINFO_QQ);
            $("#Phone").html(data.rows[0].CUSTOMER_BASEINFO_PHONE);
            $("#Mobile").html(data.rows[0].CUSTOMER_BASEINFO_MOBILE);
            $("#Micro").html(data.rows[0].CUSTOMER_WECHAT_NO);
            $("#Email").html(data.rows[0].CUSTOMER_BASEINFO_EMAIL);
            //$("#starCur0").width(Math.round(invitationCount * 85 * 2 / 100));
            //$("#starUser0").text(invitationCount + " 人");
        }

        //实例化地区列表
        function setArea(input, listValue, listOption, cityid) {
            var html = "";
            $(listOption).each(function (i, e) {
                if (cityid == listValue[i]) {
                    html += "<option value=" + listValue[i] + " selected='selected' >" + e + "</option>";
                }
                else {
                    html += "<option value=" + listValue[i] + " >" + e + "</option>";
                }
            });
            $("#" + input).html(html);
        }

        function updateSelet(inputId, valueData) {
            var html = "";
            $(valueData.rows).each(function (i, e) {
                html += "<option value=" + e.COUNTRY_CITY_ID + " >" + e.COUNTRY_CITY_NME + "</option>";
            });
            $("#" + inputId).html(html);
        }
        //更新地区下拉列表
        $('#txtcountry').change(function () {
            var outerInnerId = $(this).children('option:selected').val();
            if (currentCountry == outerInnerId) {
                return;
            }
            currentCountry = outerInnerId;
            parentsId = outerInnerId;
            btnDo("getArea2");
        });
        $('#txtcity').change(function () {
            var provinceId = $(this).children('option:selected').val();
            if (provinceId == currentCity) {
                return;
            }
            currentCity = provinceId;
            parentsId = provinceId;
            btnDo("getArea3");
        });

        function editBasicInfo() {
            $("#txtUserName").val($("#userName").text());
            //显示性别
            if ($("#sex").html() == "M") {
                $("#man").attr("checked", "checked");
            } else {
                $("#wman").attr("checked", "checked");
            }
            $("#txtBriefIntrodu").val($("#briefIntrodu").text());
            $("#txtQQ").val($("#QQ").text());
            $("#txtMobile").val($("#Mobile").text());
            $("#headPhoto").attr("src", $("#headImg").attr("src"));
            //电话
            var phone = $("#Phone").text();
            var phoneTitle = "";
            var PhoneNumber = "";
            if (!IsNull(phone)) {
                phoneTitle = phone.split('-')[0];
                PhoneNumber = phone.split('-')[1];
            }
            $("#txtPhone").val(phoneTitle);
            //$("#PhoneNumber").val(PhoneNumber);
            $("#txtMicro").val($("#Micro").text());
            $("#txtEmail").val($("#Email").text());
            $("#displayView").hide();
            $("#edit").show();
            if (IsNull($("#txtcity").html())) {
                var countryName = $("#country").html();
                var country = $("#country").attr("data-value");
                var cityName = $("#city").html();
                var city = $("#city").attr("data-value");
                var destionName = $("#destion").html();
                var destion = $("#destion").attr("data-value");
                var opart = new jsonRow();
                opart.AddCell("ACTION", "initCity");
                opart.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
                opart.AddCell("countryName", countryName);
                opart.AddCell("country", country);
                opart.AddCell("cityName", cityName);
                opart.AddCell("city", city);
                opart.AddCell("destionName", destionName);
                opart.AddCell("destion", destion);
                ajaxComm(opart);
            }
        }

        function seveUserInfo() {
            var userName = $("#txtUserName").val();
            if (!vfcUserName(userName)) {
                return
            }
            var sex = $("input[name=sex]:checked").val();
            if (!vfcSex(sex)) {
                return;
            }
            var briefIntrodu = $.trim($("#txtBriefIntrodu").val());

            if (!vfcIntrodu(briefIntrodu)) {
                return;
            }
            var countryId = $("#txtcountry option:selected").val();
            if (!vfcCity(countryId)) {
                return;
            }
            var cityId = $("#txtcity option:selected").val();
            if (!vfcCity(cityId)) {
                return;
            }
            var destionId = $("#txtdestion option:selected").val();
            if (!vfcCity(destionId)) {
                return;
            }

            var qq = $("#txtQQ").val();
            if (!vfcQQ(qq)) {
                return;
            }

            var mobile = $("#txtMobile").val();
            if (!vfcMobile(mobile)) {
                return;
            }
            var phone = $("#txtPhone").val();

            var micro = $("#txtMicro").val();
            if (!vfcMicro(micro)) {
                return;
            }

            var email = $("#txtEmail").val();
            if (!vfcEmail(email)) {
                return;
            }
            var djackImg = $("#headPhoto").attr("src");
            if (!vfcImg(djackImg)) {
                return;
            }
            djackImg = djackImg.split(' ')[0];
            var opart = new jsonRow();
            opart.AddCell("ACTION", "saveUserInfo");
            opart.AddCell("userName", userName);
            opart.AddCell("sex", sex);
            opart.AddCell("briefIntrodu", briefIntrodu);
            opart.AddCell("countryId", countryId);
            opart.AddCell("cityId", cityId);
            opart.AddCell("destionId", destionId);
            opart.AddCell("qq", qq);
            opart.AddCell("mobile", mobile);
            opart.AddCell("phone", phone);
            opart.AddCell("micro", micro);
            opart.AddCell("email", email);
            opart.AddCell("djackImg", djackImg);
            opart.AddCell("postFileNme", $("#image_file").val());
            ajaxComm(opart);
        }

        function cancelEdit() {
            $("#displayView").show();
            $("#edit").hide();
        }

        //验证用户昵称
        function vfcUserName(userName) {
            if (IsNull(userName)) {
                alert("用户昵称不能为空");
                return false;
            } else if (userName.toUpperCase().indexOf("地接客") >= 0 || userName.toUpperCase().indexOf("DJK") >= 0 || userName.toUpperCase().indexOf("DIJIEKE") >= 0) {
                alert("用户昵称不可用");
                return false;
            }
            if (!isEnLength(userName, 0, 40)) {
                alert("用户昵称最大长度为40个字符，中文算2个字符");
                return false;
            }
            return true;
        }

        //验证城市
        function vfcCity(cityId) {
            if (IsNull(cityId)) {
                alert("用户地区不能为空");
                return false;
            }
            return true;
        }

        //验证头像
        function vfcImg(photo) {
            if (IsNull(photo)) {
                alert("地接客头像不能为空");
                return false;
            }
            return true;
        }

        //验证性别
        function vfcSex(sex) {
            if (sex != "F" && sex != "M") {
                alert("请选择性别");
                return false;
            }
            return true;
        }

        //验证简介
        function vfcIntrodu(briefIntrodu) {
            if (IsNull(briefIntrodu)) {
                alert("用户简介不能为空");
                return false;
            }
            if (!islength(briefIntrodu, 0, 240)) {
                alert("用户简介最大只能有240个字符");
                return false;
            }
            return true;
        }

        //验证QQ
        function vfcQQ(qq) {
            if (!IsNull(qq) && !isQQ(qq)) {
                alert("QQ格式不正确");
                return false;
            }
            return true;
        }

        //验证手机
        function vfcMobile(tell) {
            if (IsNull(tell)) {
                alert("手机号不能为空");
                return false;
            }
            return true;
        }

        //验证微信
        function vfcMicro(micro) {
            if (IsNull(micro)) {
                return true;
            }
            if (!isEnLength(micro, 0, 30)) {
                alert("微信最大长度为30个字符,中文算两个字符");
                return false;
            }
            return true;
        }

        //验证邮箱
        function vfcEmail(email) {
            if (IsNull(email)) {
                alert("邮箱不能为空");
                return false;
            }
            if (!IsEmail(email)) {
                alert("邮箱格式不正确");
                return false;
            }
            if (!isEnLength(email, 0, 50)) {
                alert("邮箱最大长度为50个字符,中文算两个字符");
                return false;
            }
            return true;
        }
    </script>
</body>
</html>
